<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class ComposerServiceProvider extends ServiceProvider {
    /**
     * Register bindings in the container.
     *
     * @return void
     */
    public function boot() {
        // 基于类的view composer
        /*view()->composer('layout.sidebar', 'App\Composers\MenuComposer');
        view()->composer('layout.breadcrumbs', 'App\Composers\MenuComposer');
        view()->composer('layout.navbar', 'App\Composers\MenuComposer');
        */
        view()->composer('layout.sidebar', 'App\Composers\MenuComposer');
        view()->composer('layout.navbar', 'App\Composers\NavbarComposer');
    }

    
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register() {
        //
    }
}